package com.en.sharing.memberclas;

/**
 * 非静态成员类
 *
 * @author 付晓飞
 * @date 2024/3/12 7:22 下午
 */
public class NonstaticMemberClass {

    /**
     * 名称
     */
    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public class NonstaticInnerClass {

        public void test() {
            System.out.println("nonstaticInnerClass");
            System.out.println("nonstaticInnerClass 上层类名称：" + NonstaticMemberClass.this.name);
        }

    }

}
